<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>every()方法和some()方法</title>
		<script>
			var people = [
			    {name:"lb",sex:'male'},
			    {name:"wq",sex:'famale'},
			    {name:"lyd",sex:'famale'},
			];
			console.log(people)
			/*
			var result= computers.every(function(computer){
			   return computer.ram > 16
			})
			可以简写成以下语句
			*/
			var result= people.every(people=>people.sex === 'famale')
			console.log('该对象数组所有人都是女性：'+result)//返回值是false;
			var some = people.some(people=>people.sex === 'famale')
			console.log('该对象数组包含有女性：'+some)//返回值是true;
		</script>
	</head>
	<body>
	</body>
</html>
